package com.lvmama.rhino.common.utils

import java.io.{FileNotFoundException, IOException}
import java.util.Properties

/**
  * Created by yuanxiaofeng on 2016/6/14.
  */
object ConfigHelper {
  def getProperties(path: String): Properties = {
    val properties = new Properties()
    try {
      val e = ConfigHelper.getClass.getClassLoader.getResourceAsStream(path)
      properties.load(e)
    } catch {
      case e1: FileNotFoundException => e1.printStackTrace()
      case e2: IOException => e2.printStackTrace()
    }
    properties
  }
}
